package team.kirohuji.repository.jpa.user;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import team.kirohuji.domain.user.ShiroSession;

/**
 * 这个类用来管理ShiroSessionRepository类
 * 
 * @author kirohuji
 *
 */
@Repository
public interface ShiroSessionRepository extends JpaRepository<ShiroSession, String>{

	@Query(value="delete from shiro_session where shiro_session_id = ?1",nativeQuery=true)
	int deleteByPrimaryKey(String string);
	@Query(value="select shiro_session from shiro_session where shiro_session_id =?1",nativeQuery=true)
	List<String> findSessionByPrimaryKey(String string);
	
}